const Koa = require('koa');
const app = new Koa();
const views = require('koa-views');
const { resolve } = require('path');
// const { htmlTpl, ejsTpl, pugTpl } = require('./tpl/index.js');
// const ejs = require('ejs');
// const pug = require('pug');   //有了pug所以上面的ejs就不需要了
app.use(views(resolve(__dirname, './views'), {
  extension: 'pug'
}))
app.use(async (ctx, next) => {
  await ctx.render('index', {
    you: 'Luke',
    me: 'Scott'
  })
});
app.listen(4455);


